package com.lg.concurrent.base;

public class RunThread  {
    static  class  SameThread extends  Thread{
        private String flag;
        SameThread(String flag){
            this.flag = flag;
        }
        @Override
        public void run() {
            for (int i = 0; i < 20; i++) {
                System.out.println(this.flag + " ---> " + i);
            }
        }
    }

    /**
     * ggg 这只是一个引用而已,肯定可以来回调用
     *
     */
    public static void main(String[] args) {
        for (int i = 0; i < 5; i++) {
            SameThread ggg = new SameThread("ggg"+i);
            ggg.start();
        }
    }
}
